import request from '@/utils/request'

export const list = function(params) {
  return request({
    url: '/api/task-service/task/search',
    method: 'GET',
    params
  })
}

// 工单搜索
export const channelList = function(innerCode) {
  return request({
    url: '/api/vm-service/channel/channelList/' + innerCode,
    method: 'GET'
  })
}

// 创建工单
export const createTickets = function(data) {
  return request({
    url: '/api/task-service/task/create',
    method: 'POST',
    data
  })
}

// 取消工单
export const ticketCancel = function(data) {
  return request({
    url: '/api/task-service/task/cancel/' + data.taskId,
    method: 'POST',
    data
  })
}
